<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
    <head>
        <meta charset="UTF-8"name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
        <link rel="stylesheet" href="/css/main.css" th:href="@{/css/main.css}" />
        <link rel="stylesheet" href="/css/my.css" th:href="@{/css/my.css}" />
        <link rel="stylesheet" href="/css/alert.css" th:href="@{/css/alert.css}"/>
        <title>admin page</title>
    </head>
    <body>
    <div id="yu_admin">
        <div th:replace="welcome::logout"></div>
        <h1 id ="username" th:text="${current_user_name}">admin</h1>

        <form action="#" th:action="@{/admin_init}" method="post">
            <button class="but" type="submit">初始化全部人物</button>
        </form>

        <form action="#" th:action="@{/user_set}" method="post">
            <select class = "chose" name="username">
                <option value="admin">admin</option>
            </select>
            <br/>
            <label for="password">Password:</label><br/>
            <input type="password" id="password" name="password" /> <br />
            <button class="but" type="submit">设置密码</button>
        </form>
        <form action="#" th:action="@{/user_set_HP}" method="post">
            <select class = "chose">
            </select>
            <br/>
            <label for="HP">HP:</label><br/>
            <input type="HP" id="HP" name="HP" pattern="[0-9]*"/> <br />
            <button class="but" type="submit">设置HP</button>
        </form>
        <form action="#" th:action="@{/user_set_MP}" method="post">
            <select class = "chose">
            </select>
            <br/>
            <label for="MP">MP:</label><br/>
            <input type="MP" id="MP" name="MP" pattern="[0-9]*"/> <br />
            <button class="but" type="submit">设置MP</button>
        </form>
        <form action="#" th:action="@{/user_set_Item_list}" method="post">
            <select class = "chose">
            </select>
            <br/>
            <label for="Item_list">物品栏:</label><br/>
            <input type="text" id="Item_list" name="Item_list" /> <br />
            <button class="but" type="submit">设置物品栏</button>
        </form>

        <form action="#" th:action="@{/socket}" method="post">
            <select class = "chose">
            </select>
            <br/>
            <label for="Item_list">推送任务:</label><br/>
            <input id="task" name="task" type="text" />
            <br />
            <button class="but" type="submit">推送</button>
            <br />
        </form>

        <p><a href="/welcome" th:href="@{/welcome}"> back to home </a>></p>
        <li>Go to the <a href="/admin/see" th:href="@{/admin/see}">admin see all</a></li>
    </div>
    <script type="text/javascript" src="/js/alert.js"></script>
    <script type="text/javascript" src="/js/adapt.js"></script>
    <script type="text/javascript" src="/js/websocket.js"></script>
    </body>
</html>